package com.geezdata.cps.sdk3rd.wyeth.request;

import java.util.Date;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

import com.geezdata.cps.base.utils.DateUtil;
import com.geezdata.cps.sdk3rd.wyeth.response.WyethQueryOrderResult;

public class WyethQueryOrderRequest extends WyethRequest<WyethQueryOrderResult>{
    //订单的payTime在startTime和endTime之间
    private Date startTime;
    
    private Date endTime;
    
    //起始条数
    @NotNull(message = "pageIndex >= 0!")
    @Min(0)
    private Integer pageIndex;
    
    //返回数量
    @NotNull(message = "pageSize > 0!")
    @Min(1)
    private Integer pageSize;

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
        this.apiParams.put("startTime", DateUtil.formatDate(startTime));
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
        this.apiParams.put("endTime", DateUtil.formatDate(endTime));
    }

    public Integer getPageIndex() {
        return pageIndex;
    }

    public void setPageIndex(Integer pageIndex) {
        this.pageIndex = pageIndex;
        this.apiParams.put("pageIndex", pageIndex.toString());
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
        this.apiParams.put("pageSize", pageSize.toString());
    }
    
    @Override
    public Class<WyethQueryOrderResult> getResponseClass() {
        return WyethQueryOrderResult.class;
    }
}
